package com.gxg.newdemo1.mynewdamo1.channel.util;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

import com.gxg.newdemo1.mynewdamo1.BaseApplication;


/**
 * toast工具类
 * 
 * @author yf
 * Toast toast = Toast.makeText(this,"最高记录：" + pre.getLong("total", 0), Toast.LENGTH_LONG);
toast.setGravity(Gravity.TOP , 0, 50);
toast.show();
 *
 */

public class ToastUtils {
	
	public static void toastS(String msg,Context context){

//		Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
		Toast toast = Toast.makeText(BaseApplication.getInstance(),msg,Toast.LENGTH_SHORT);
		toast.setGravity(Gravity.CENTER,0,0);
		toast.show();

	}
	
	public static void toastL(String msg,Context context){
//		Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
		Toast toast = Toast.makeText(BaseApplication.getInstance(),msg,Toast.LENGTH_LONG);
		toast.setGravity(Gravity.CENTER,0,0);
		toast.show();
	}

	public static void show(Context context,String msg){
//		Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
		Toast toast = Toast.makeText(BaseApplication.getInstance(),msg,Toast.LENGTH_LONG);
		toast.setGravity(Gravity.CENTER,0,0);
		toast.show();
	}



}
